﻿@model MatchSearchResultViewModel

@{ var routeValues = new { area = "MatchArea", id = Model.Match.Pk };}

@if (Model.IsVisible)
{
    <div class="searchitem">
        <div>
            <a class="search1" href="@Url.Action("Index", "Details", routeValues)">@Model.Match.Description</a>

            @if (!Model.Match.IsApproved)
            {
                <span class="k-icon k-i-note" title="Awaiting approval."></span>
            }

        </div>
        
        <div class="search2">@Model.Match.MatchDate._ToDisplayString()</div>

        <div>
            <a class="search2" href="@Url.Action("Index", "Details", new { area = "CompetitionArea", id = Model.Match.CompetitionGuid })">@Model.Match.Competition.CompetitionName</a>
        </div>

        <div>
            @if (Model.IsDeleteVisible) { @Html.Partial("Links/_DeleteLink", routeValues); }

            @if (Model.IsConfirmApprovalVisible) { @Html.Partial("Links/_ConfirmApprovalLink", routeValues); }

            @if (Model.CanImport)
            {
                <a class="k-button" href="@Url.Action("FullMatch", "Import", new { area = "MatchArea", id = Model.Match.Pk })" title="Import">Import</a>
            }
        </div>
    </div>
}

